import { $demoi18n } from '@/utils/lang';
const formula = [
  {
    name: $demoi18n('formula.aggregateFunction'),
    type: 'agg',
    child: [
      {
        name: 'max',
        code: 'max()',
        description: `max(array, dim1, dim2, dim3,...): ${$demoi18n('formula.aggregateFunction.commonTip')}`,
      },
      {
        name: 'min',
        code: 'min()',
        description: `min(array, dim1, dim2, dim3,...): ${$demoi18n('formula.aggregateFunction.commonTip')}`,
      },
      {
        name: 'sum',
        code: 'sum()',
        description: `sum(array, dim1, dim2, dim3,...): ${$demoi18n('formula.aggregateFunction.commonTip')}`,
      },
      {
        name: 'avg',
        code: 'avg()',
        description: `avg(array, dim1, dim2, dim3,...): ${$demoi18n('formula.aggregateFunction.commonTip')}`,
      },
      {
        name: 'count',
        code: 'count()',
        description: `count(array, dim1, dim2, dim3,...): ${$demoi18n('formula.aggregateFunction.commonTip')}`,
      },
    ],
  },
  {
    name: $demoi18n('formula.ordinaryFunction'),
    type: 'normal',
    child: [
      {
        name: 'round',
        code: 'round(number,num_digits)',
        validation: ['number', 'number'],
        description: $demoi18n('formula.function.round.tip'),
      },
      {
        name: 'pow',
        code: 'pow(b, e)',
        validation: ['number', 'number'],
        description: $demoi18n('formula.function.pow.tip'),
      },
      {
        name: 'sqrt',
        code: 'sqrt(x)',
        validation: ['number', 'number'],
        description: $demoi18n('formula.function.sqrt.tip'),
      },
      {
        name: 'abs',
        code: 'abs(x)',
        validation: ['number', 'number'],
        description: $demoi18n('formula.function.abs.tip'),
      },
      {
        name: 'floor',
        code: 'floor(x)',
        validation: ['number', 'number'],
        description: $demoi18n('formula.function.floor.tip'),
      },
      {
        name: 'ln',
        code: 'ln(x)',
        validation: ['number', 'number'],
        description: $demoi18n('formula.function.ln.tip'),
      },
      {
        name: 'cos',
        code: 'cos(x)',
        validation: ['number', 'number'],
        description: $demoi18n('formula.function.cos.tip'),
      },
      {
        name: 'sin',
        code: 'sin(x)',
        validation: ['number', 'number'],
        description: $demoi18n('formula.function.sin.tip'),
      },
      {
        name: 'tan',
        code: 'tan(x)',
        validation: ['number', 'number'],
        description: $demoi18n('formula.function.tan.tip'),
      },
    ],
  },
];
export default formula;
